<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>订单详细</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="<c:url value='/adminjsps/admin/css/order/desc.css'/>">
  </head>
  
<body>
	<div class="divOrder">
		<span>订单号：${order.oid }&nbsp;
		<c:choose>
	<c:when test="${order.status eq 1 }"><font color="red">(等待付款)</font>&nbsp;</c:when>
	<c:when test="${order.status eq 2 }"><font color="red">(准备发货)</font>&nbsp;</c:when>
	<c:when test="${order.status eq 3 }"><font color="red">(等待确认)</font>&nbsp;</c:when>
	<c:when test="${order.status eq 4 }"><font color="red">(交易成功)</font>&nbsp;</c:when>
	<c:when test="${order.status eq 5 }"><font color="red">(已取消)</font>&nbsp;</c:when>
	</c:choose>
			     用户名：${order.owner.loginname }&nbsp;
		　　　下单时间：${order.ordertime }
		</span>
	</div>
	<div class="divRow">
		<div class="divContent">
			<dl>
				<dt>收货人信息</dt>
				<dd>${order.address }</dd>
			</dl>
		</div>
		<div class="divContent">
			<dl>
				<dt>商品清单</dt>
				<dd>
					<table width="95%" align="center" cellpadding="0" cellspacing="0">
	<tr bgcolor="#efeae5">
		<td width="400px" colspan="5"><span style="font-weight: 900;">生成订单</span></td>
	</tr>
	<tr align="center">
		<td width="10%">&nbsp;</td>
		<td width="50%">图书名称</td>
		<td>单价</td>
		<td>数量</td>
		<td>小计</td>
	</tr>


<c:forEach items="${order.orderItemList }" var="orderItem">
	<tr align="center">
		<td align="right">
			<a title="${orderItem.book.bname }" class="linkImage" href="<c:url value='/admin/AdminBookServlet?method=findByBid&bid=${orderItem.book.bid }'/>"><img border="0" width="54" align="top" src="<c:url value='/${orderItem.book.image_b }'/>"/></a>
		</td>
		<td align="left">
			<a title="${orderItem.book.bname }" href="<c:url value='/admin/AdminBookServlet?method=findByBid&bid=${orderItem.book.bid }'/>"><span>${orderItem.book.bname }</span></a>
		</td>
		<td>&yen;${orderItem.book.currPrice }</td>
		<td>${orderItem.quantity }</td>
		<td>
			<span class="price_n">&yen;<span class="subtotal">${orderItem.subtotal }</span></span>
		</td>
	</tr>
</c:forEach>

					</table>
				</dd>
			</dl>
		</div>
		<div class="divBtn">
			<span class="spanTotal">合　　计：</span>
			<span class="price_t">&yen;${order.total }</span><br/>
	<c:if test="${order.status eq 2 }">
	<a id="deliver" href="<c:url value='/admin/AdminOrderServlet?method=send&oid=${order.oid }'/>">发　　货</a>
	</c:if>
	<c:if test="${order.status eq 1 }">
	<a id="cancel" href="<c:url value='/admin/AdminOrderServlet?method=cancel&oid=${order.oid }'/>">取　　消</a>
	</c:if>
		</div>
	</div>
</body>
</html>

